# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flatbencode
_pkgname=flatbencode
pkgver=0.2.1
pkgrel=7
pkgdesc='Fast, safe and non-recursive implementation of Bittorrent bencoding for Python 3.'
arch=('any')
url='https://pypi.org/project/flatbencode/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d6ad9cece7eaae19e2ded9262494d8c9e0cfbc589a37d18ebf6fba3b90cbd38d811e3e500319149e8ef9c0eaf5e99484f06916f49cfc4285aea16ed7c771c973')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

